﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<EM.Components.Entities.EM_Campaigns>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <th>
                CampaignID
            </th>
            <th>
                StartDate
            </th>
            <th>
                EndDate
            </th>
            <th>
                CampaignName
            </th>
            <th>
                CampaignDesc
            </th>
            <th>
                Owner
            </th>
            <th>
                ApprovalRequest
            </th>
            <th>
                Approved
            </th>
            <th>
                ApprovedBy
            </th>
            <th>
                ApprovedDate
            </th>
            <th>
                Guid
            </th>
            <th>
                Submitted
            </th>
            <th>
                CreatedDate
            </th>
            <th>
                CreatedBy
            </th>
            <th>
                UpdatedDate
            </th>
            <th>
                UpdatedBy
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.CampaignID }) %> |
                <%: Html.ActionLink("Details", "Details", new { id=item.CampaignID })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.CampaignID })%>
            </td>
            <td>
                <%: item.CampaignID %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.StartDate) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.EndDate) %>
            </td>
            <td>
                <%: item.CampaignName %>
            </td>
            <td>
                <%: item.CampaignDesc %>
            </td>
            <td>
                <%: item.Owner %>
            </td>
            <td>
                <%: item.ApprovalRequest %>
            </td>
            <td>
                <%: item.Approved %>
            </td>
            <td>
                <%: item.ApprovedBy %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.ApprovedDate) %>
            </td>
            <td>
                <%: item.Guid %>
            </td>
            <td>
                <%: item.Submitted %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.CreatedDate) %>
            </td>
            <td>
                <%: item.CreatedBy %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.UpdatedDate) %>
            </td>
            <td>
                <%: item.UpdatedBy %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

